package practise.interview;

import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.util.ArrayList;

public class CollectionTest {
    @Test
    public void testCollectionSizeAndLastIndexOf(){
        ArrayList<String> strings = new ArrayList<String>();
        ArrayList<String> strings1 = new ArrayList<String>(10);
        ArrayList<String> strings2 = new ArrayList<String>(100);
        //the size of the arrayList only changes when add or remove , and
        assertEquals(10 , strings.size());
        assertEquals(10 , strings1.size());
        assertEquals(100 , strings2.size());

    }
}
